#{extends 'main.html' /}
<head>
    <script type="text/javascript">
        function showdialog(path){
            var url = document.getElementById(path).value;
            document.getElementById(showsnap).href = url;
        }
        
        $(document).ready(function(){
            $(".showsnap").colorbox({
                width: "80%",
                height: "80%",
                iframe: true
            });
        });
        document.getElementById(snapshot).value;
    </script>
</head>
<h2><a style ="color:#400040;" href=" @{Projects.showProject(sprint.project.getEntityId())}">${sprint.project.name}</a> > <a style ="color:#400040;" href=" @{Events.showSprints(sprint.project.getEntityId())}">Sprints</a> > ${sprint.name}</h2>
<hr/>
<a href="@{Events.editSprintPage(sprint.project.getEntityId(), sprint.getEntityId())}">Edit Sprint</a>
&nbsp;&nbsp;|&nbsp;&nbsp;<a href="@{Events.showSprintEvents(sprint.getEntityId())}">Sprint Events</a>
#{secure.check 'Remove a sprint from a project'}
	&nbsp;&nbsp;|&nbsp;&nbsp;<a href="javascript:showDialogHelper('Confirmation','Are you sure you want to delete this sprint?',true,'@{Events.removeSprint(sprint.getEntityId())}','prompt');">Delete Sprint</a> 
#{/secure.check}
#{secure.check 'View Burn Down Chart'}
	&nbsp;&nbsp;|&nbsp;&nbsp;<a href="@{BurnDownChart.showChart(sprint.getEntityId())}">Burndown Chart</a>
#{/secure.check}
#{secure.check 'View the sprint backlog'}
	&nbsp;&nbsp;|&nbsp;&nbsp;<a href="@{SprintBacklog.viewSprintBacklog(sprint.project.getEntityId(),sprint.getEntityId())}"> Sprint Backlog</a>
#{/secure.check}
#{secure.check 'View Project Virtual Board'}
    &nbsp;&nbsp;|&nbsp;&nbsp;<a href="@{Board.viewBoard(sprint.getEntityId())}">Board</a>
#{/secure.check}
<hr/>
<h3>Sprint Details:</h3>
<b>Start Date:</b> ${sprint.startDate.get(Calendar.DATE)}/${sprint.startDate.get(Calendar.MONTH)+1}/${sprint.startDate.get(Calendar.YEAR)} 
<br/><br/>
<b>End Date:</b> ${sprint.endDate.get(Calendar.DATE)}/${sprint.endDate.get(Calendar.MONTH)+1}/${sprint.endDate.get(Calendar.YEAR)}
<br/><br/>
<b>Description/Goal:</b> ${sprint.description}
<br/>
#{if snapShots}
<br/>Past Snapshots<br/>
#{list items:snapShots, as:'snapShots'}
<a id="showsnap" class='showsnap' href="${snapShots.url}">Name:${snapShots.name}, Date & Time taken:${snapShots.dateTaken.getTime();}</a>
<br/>
#{/list}
#{/if}
<br/>
<table>
    <div class="msg_list">
        <div class="msg_h">
            <h2 class="msg_head">Components Artifacts</h2>
        </div>
        <div class="msg_body1">
            #{list items:sprint.project.components, as:'projectComponentList'}
            #{form @SprintBacklog.viewComponentS(projectComponentList.id,sprint.project.getEntityId(),sprint.getEntityId())}
            <p style="color:#400040;" class="msg_head2">
                <b>${projectComponentList.name}:</b>
                ${projectComponentList.description}
            </p>
            <div class="msg_body">
                <a href="@{SprintBacklog.viewComponentS(projectComponentList.id,sprint.project.getEntityId(),sprint.getEntityId())}">Sprint Backlog</a>
                #{secure.check 'View Burn Down Chart'}
					&nbsp;&nbsp;|&nbsp;&nbsp;<a href="@{BurnDownChart.showComponentChart(sprint.getEntityId(),projectComponentList.id)}">Burndown Chart</a>
                #{/secure.check}
                #{secure.check 'View Component Virtual Board'}
					&nbsp;&nbsp;|&nbsp;&nbsp;<a href="@{Board.viewComponentBoard(sprint.getEntityId(),projectComponentList.getEntityId())}">Board</a>
                #{/secure.check}
            </div>
            #{/form}
            #{/list}
        </div>
    </div>
</table>